package com.qfedu.smart_community.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName pay_items
 */
public class PayItems implements Serializable {
    /**
     * 序号
     */
    private Integer id;

    /**
     * 收费编码
     */
    private String chargeCode;

    /**
     * 收费名称
     */
    private String chargeName;

    /**
     * 收费方式:1周期性 2临时性
     */
    private Integer chargeWay;

    /**
     * 收费类型0普通 1押金-1预收金
     */
    private Integer chargeType;

    /**
     * 计费方式：建面（单价*建筑面积）   使用面积（单价*使用面积）   定额（单价）  公式
     */
    private String chargeMode;

    /**
     * 计费单价
     */
    private Double chargePrice;

    /**
     * 收费倍率
     */
    private Double chargeRate;

    /**
     * 周期单位：0 ：年    1：月      2： 日
     */
    private Integer periodicUnit;

    /**
     * 计费精度:   0:元   1:角     2:分 
     */
    private Integer chargePrecision;

    /**
     * 取舍方式:   0 四舍五入    1直接舍弃      2直接进位
     */
    private Integer choiceMode;

    /**
     * 计费开始日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date chargeStartDate;

    /**
     * 计费结束日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date chargeEndDate;

    /**
     * 违约金率%
     */
    private Double penaltyRate;

    /**
     * 违约开始天数（多少天之后违约）
     */
    private Integer penaltyDay;

    /**
     * 录入时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone = "GMT+8")
    private Date recordDate;

    /**
     * 录入人
     */
    private String recordPerson;

    private static final long serialVersionUID = 1L;

    /**
     * 序号
     */
    public Integer getId() {
        return id;
    }

    /**
     * 序号
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 收费编码
     */
    public String getChargeCode() {
        return chargeCode;
    }

    /**
     * 收费编码
     */
    public void setChargeCode(String chargeCode) {
        this.chargeCode = chargeCode;
    }

    /**
     * 收费名称
     */
    public String getChargeName() {
        return chargeName;
    }

    /**
     * 收费名称
     */
    public void setChargeName(String chargeName) {
        this.chargeName = chargeName;
    }

    /**
     * 收费方式:1周期性 2临时性
     */
    public Integer getChargeWay() {
        return chargeWay;
    }

    /**
     * 收费方式:1周期性 2临时性
     */
    public void setChargeWay(Integer chargeWay) {
        this.chargeWay = chargeWay;
    }

    /**
     * 收费类型0普通 1押金-1预收金
     */
    public Integer getChargeType() {
        return chargeType;
    }

    /**
     * 收费类型0普通 1押金-1预收金
     */
    public void setChargeType(Integer chargeType) {
        this.chargeType = chargeType;
    }

    /**
     * 计费方式：0建面（单价*建筑面积）   1：使用面积（单价*使用面积）   2：定额（单价）  3 公式
     */
    public String getChargeMode() {
        return chargeMode;
    }

    /**
     * 计费方式：0建面（单价*建筑面积）   1：使用面积（单价*使用面积）   2：定额（单价）  3 公式
     */
    public void setChargeMode(String chargeMode) {
        this.chargeMode = chargeMode;
    }

    /**
     * 计费单价
     */
    public Double getChargePrice() {
        return chargePrice;
    }

    /**
     * 计费单价
     */
    public void setChargePrice(Double chargePrice) {
        this.chargePrice = chargePrice;
    }

    /**
     * 收费倍率
     */
    public Double getChargeRate() {
        return chargeRate;
    }

    /**
     * 收费倍率
     */
    public void setChargeRate(Double chargeRate) {
        this.chargeRate = chargeRate;
    }

    /**
     * 周期单位：0 ：年    1：月      2： 日
     */
    public Integer getPeriodicUnit() {
        return periodicUnit;
    }

    /**
     * 周期单位：0 ：年    1：月      2： 日
     */
    public void setPeriodicUnit(Integer periodicUnit) {
        this.periodicUnit = periodicUnit;
    }

    /**
     * 计费精度:   0:元   1:角     2:分 
     */
    public Integer getChargePrecision() {
        return chargePrecision;
    }

    /**
     * 计费精度:   0:元   1:角     2:分 
     */
    public void setChargePrecision(Integer chargePrecision) {
        this.chargePrecision = chargePrecision;
    }

    /**
     * 取舍方式:   0 四舍五入    1直接舍弃      2直接进位
     */
    public Integer getChoiceMode() {
        return choiceMode;
    }

    /**
     * 取舍方式:   0 四舍五入    1直接舍弃      2直接进位
     */
    public void setChoiceMode(Integer choiceMode) {
        this.choiceMode = choiceMode;
    }

    /**
     * 计费开始日期
     */
    public Date getChargeStartDate() {
        return chargeStartDate;
    }

    /**
     * 计费开始日期
     */
    public void setChargeStartDate(Date chargeStartDate) {
        this.chargeStartDate = chargeStartDate;
    }

    /**
     * 计费结束日期
     */
    public Date getChargeEndDate() {
        return chargeEndDate;
    }

    /**
     * 计费结束日期
     */
    public void setChargeEndDate(Date chargeEndDate) {
        this.chargeEndDate = chargeEndDate;
    }

    /**
     * 违约金率%
     */
    public Double getPenaltyRate() {
        return penaltyRate;
    }

    /**
     * 违约金率%
     */
    public void setPenaltyRate(Double penaltyRate) {
        this.penaltyRate = penaltyRate;
    }

    /**
     * 违约开始天数（多少天之后违约）
     */
    public Integer getPenaltyDay() {
        return penaltyDay;
    }

    /**
     * 违约开始天数（多少天之后违约）
     */
    public void setPenaltyDay(Integer penaltyDay) {
        this.penaltyDay = penaltyDay;
    }

    /**
     * 录入时间
     */
    public Date getRecordDate() {
        return recordDate;
    }

    /**
     * 录入时间
     */
    public void setRecordDate(Date recordDate) {
        this.recordDate = recordDate;
    }

    /**
     * 录入人
     */
    public String getRecordPerson() {
        return recordPerson;
    }

    /**
     * 录入人
     */
    public void setRecordPerson(String recordPerson) {
        this.recordPerson = recordPerson;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PayItems other = (PayItems) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getChargeCode() == null ? other.getChargeCode() == null : this.getChargeCode().equals(other.getChargeCode()))
            && (this.getChargeName() == null ? other.getChargeName() == null : this.getChargeName().equals(other.getChargeName()))
            && (this.getChargeWay() == null ? other.getChargeWay() == null : this.getChargeWay().equals(other.getChargeWay()))
            && (this.getChargeType() == null ? other.getChargeType() == null : this.getChargeType().equals(other.getChargeType()))
            && (this.getChargeMode() == null ? other.getChargeMode() == null : this.getChargeMode().equals(other.getChargeMode()))
            && (this.getChargePrice() == null ? other.getChargePrice() == null : this.getChargePrice().equals(other.getChargePrice()))
            && (this.getChargeRate() == null ? other.getChargeRate() == null : this.getChargeRate().equals(other.getChargeRate()))
            && (this.getPeriodicUnit() == null ? other.getPeriodicUnit() == null : this.getPeriodicUnit().equals(other.getPeriodicUnit()))
            && (this.getChargePrecision() == null ? other.getChargePrecision() == null : this.getChargePrecision().equals(other.getChargePrecision()))
            && (this.getChoiceMode() == null ? other.getChoiceMode() == null : this.getChoiceMode().equals(other.getChoiceMode()))
            && (this.getChargeStartDate() == null ? other.getChargeStartDate() == null : this.getChargeStartDate().equals(other.getChargeStartDate()))
            && (this.getChargeEndDate() == null ? other.getChargeEndDate() == null : this.getChargeEndDate().equals(other.getChargeEndDate()))
            && (this.getPenaltyRate() == null ? other.getPenaltyRate() == null : this.getPenaltyRate().equals(other.getPenaltyRate()))
            && (this.getPenaltyDay() == null ? other.getPenaltyDay() == null : this.getPenaltyDay().equals(other.getPenaltyDay()))
            && (this.getRecordDate() == null ? other.getRecordDate() == null : this.getRecordDate().equals(other.getRecordDate()))
            && (this.getRecordPerson() == null ? other.getRecordPerson() == null : this.getRecordPerson().equals(other.getRecordPerson()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getChargeCode() == null) ? 0 : getChargeCode().hashCode());
        result = prime * result + ((getChargeName() == null) ? 0 : getChargeName().hashCode());
        result = prime * result + ((getChargeWay() == null) ? 0 : getChargeWay().hashCode());
        result = prime * result + ((getChargeType() == null) ? 0 : getChargeType().hashCode());
        result = prime * result + ((getChargeMode() == null) ? 0 : getChargeMode().hashCode());
        result = prime * result + ((getChargePrice() == null) ? 0 : getChargePrice().hashCode());
        result = prime * result + ((getChargeRate() == null) ? 0 : getChargeRate().hashCode());
        result = prime * result + ((getPeriodicUnit() == null) ? 0 : getPeriodicUnit().hashCode());
        result = prime * result + ((getChargePrecision() == null) ? 0 : getChargePrecision().hashCode());
        result = prime * result + ((getChoiceMode() == null) ? 0 : getChoiceMode().hashCode());
        result = prime * result + ((getChargeStartDate() == null) ? 0 : getChargeStartDate().hashCode());
        result = prime * result + ((getChargeEndDate() == null) ? 0 : getChargeEndDate().hashCode());
        result = prime * result + ((getPenaltyRate() == null) ? 0 : getPenaltyRate().hashCode());
        result = prime * result + ((getPenaltyDay() == null) ? 0 : getPenaltyDay().hashCode());
        result = prime * result + ((getRecordDate() == null) ? 0 : getRecordDate().hashCode());
        result = prime * result + ((getRecordPerson() == null) ? 0 : getRecordPerson().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", chargeCode=").append(chargeCode);
        sb.append(", chargeName=").append(chargeName);
        sb.append(", chargeWay=").append(chargeWay);
        sb.append(", chargeType=").append(chargeType);
        sb.append(", chargeMode=").append(chargeMode);
        sb.append(", chargePrice=").append(chargePrice);
        sb.append(", chargeRate=").append(chargeRate);
        sb.append(", periodicUnit=").append(periodicUnit);
        sb.append(", chargePrecision=").append(chargePrecision);
        sb.append(", choiceMode=").append(choiceMode);
        sb.append(", chargeStartDate=").append(chargeStartDate);
        sb.append(", chargeEndDate=").append(chargeEndDate);
        sb.append(", penaltyRate=").append(penaltyRate);
        sb.append(", penaltyDay=").append(penaltyDay);
        sb.append(", recordDate=").append(recordDate);
        sb.append(", recordPerson=").append(recordPerson);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}